package com.xxadmin.usercenter.service.impl;

import com.xxadmin.common.util.clone.CopyUtils;
import com.xxadmin.usercenter.dao.UserInfoDao;
import com.xxadmin.usercenter.domain.UserInfo;
import com.xxadmin.usercenter.dto.UserInfoDTO;
import com.xxadmin.usercenter.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户管理实现类
 *
 * @author:chenming
 * @date:2018/9/4
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoDao userInfoDao;

    @Override
    public void addUserInfo(UserInfoDTO userInfoDTO) {

    }


    @Override
    public UserInfoDTO getUserByUserName(String userName) {
        UserInfo userInfo = userInfoDao.selectByUserName(userName);

        return CopyUtils.copyBean(userInfo,UserInfoDTO.class);
    }
}
